<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp" %>
<!DOCTYPE HTML>
<html ng-app>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <META HTTP-EQUIV="pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
    <title>${title}</title>
    <%@ include file="/WEB-INF/jsp/commons/meta.jsp" %>
    <link href="${ctx}/resources/new/style.css" type="text/css" rel="stylesheet"/>

</head>
<body>
<!-- 分页显示演示开始 -->
<form id="listForm" class="well form-search" action="${ctx}/adoms/consumerKid/list" method="get">
    <input type="hidden" name="pageNo" id="pageNo" value="${pageData.pagination.pageNo}"/>
    <input type="hidden" name="fieldName" id="fieldName" value="${pageData.compositor.fieldName}"/>
    <input type="hidden" name="compositorType" id="compositorType" value="${pageData.compositor.compositorType}"/>
    <table class="table table-striped table-bordered table-condensed">
        <tr align="center">
            <th>
                宝宝姓名|父母姓名
                <y:search fieldType="S" fieldList="fullName,consumer.fullName" matchType="LIKE"
                          className="input-medium search-query"/>
                <button class="btn btn-small" onclick="search()" type="button">
                    <i class="icon-search"></i>
                    搜索
                </button>
                <a href="${ctx}/adoms/consumerKid/new" class="btn btn-small right">添加消费者子女信息</a>
            </th>
        </tr>
    </table>
</form>
<table class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>#</th>
        <th>
            <a href="javascript:sort('fullName')">宝宝姓名</a>
        </th>
        <th>
            <a href="javascript:sort('age')">年龄</a>
        </th>
        <th>
            <a href="javascript:sort('birthDay')">出生日期/预产期</a>
        </th>
        <th>
            <a href="javascript:sort('sex')">性别</a>
        </th>
        <th>
            <a href="javascript:sort('height')">身高</a>
        </th>
        <th>
            <a href="javascript:sort('weight')">体重</a>
        </th>
        <th>
            <a href="javascript:sort('consumer.fullName')">父母姓名</a>
        </th>
        <th>
            <a href="javascript:sort('memo')">备注</a>
        </th>
        <th>插入时间</th>
        <th>修改时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="entity" items="${pageData.result}" varStatus="index">
        <tr <c:if test="${!entity.visible}">bgcolor="#AFEEEE"</c:if>>
            <td>${index.index + 1}</td>
            <td>${entity.fullName}</td>
            <td>${entity.age}</td>
            <td>${entity.birthDay}</td>
            <td>${(entity.sex eq 'M')?"男":"女"}</td>
            <td>${entity.height}</td>
            <td>${entity.weight}</td>
            <td>${entity.consumer.fullName}</td>
            <td>${entity.memo}</td>
            <td>${entity.insertTime}</td>
            <td>${entity.lastUpdateTime}</td>
            <td>
                <a href="${ctx}/adoms/consumerKid/edit/${entity.id}">修改</a> | <a
                    href="${ctx}/adoms/consumerKid/delete/${entity.id}" confirm="删除后无法恢复,确定要删除吗?">刪除</a>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<%@ include file="/WEB-INF/jsp/commons/pager.jsp" %>
</body>
</html>